Optimal. Leaf size=177 \[ -\frac {B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )+A}{3 b g^4 (a+b x)^3}-\frac {2 B d^3 \log (a+b x)}{3 b g^4 (b c-a d)^3}+\frac {2 B d^3 \log (c+d x)}{3 b g^4 (b c-a d)^3}-\frac {2 B d^2}{3 b g^4 (a+b x) (b c-a d)^2}+\frac {B d}{3 b g^4 (a+b x)^2 (b c-a d)}-\frac {2 B}{9 b g^4 (a+b x)^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 177, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.094, Rules used = {2525, 12, 44} \[ -\frac {B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )+A}{3 b g^4 (a+b x)^3}-\frac {2 B d^2}{3 b g^4 (a+b x) (b c-a d)^2}-\frac {2 B d^3 \log (a+b x)}{3 b g^4 (b c-a d)^3}+\frac {2 B d^3 \log (c+d x)}{3 b g^4 (b c-a d)^3}+\frac {B d}{3 b g^4 (a+b x)^2 (b c-a d)}-\frac {2 B}{9 b g^4 (a+b x)^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 44
Rule 2525
Rubi steps
\begin {align*} \int \frac {A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{(a g+b g x)^4} \, dx &=-\frac {A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{3 b g^4 (a+b x)^3}+\frac {B \int \frac {2 (b c-a d)}{g^3 (a+b x)^4 (c+d x)} \, dx}{3 b g}\\ &=-\frac {A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{3 b g^4 (a+b x)^3}+\frac {(2 B (b c-a d)) \int \frac {1}{(a+b x)^4 (c+d x)} \, dx}{3 b g^4}\\ &=-\frac {A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{3 b g^4 (a+b x)^3}+\frac {(2 B (b c-a d)) \int \left (\frac {b}{(b c-a d) (a+b x)^4}-\frac {b d}{(b c-a d)^2 (a+b x)^3}+\frac {b d^2}{(b c-a d)^3 (a+b x)^2}-\frac {b d^3}{(b c-a d)^4 (a+b x)}+\frac {d^4}{(b c-a d)^4 (c+d x)}\right ) \, dx}{3 b g^4}\\ &=-\frac {2 B}{9 b g^4 (a+b x)^3}+\frac {B d}{3 b (b c-a d) g^4 (a+b x)^2}-\frac {2 B d^2}{3 b (b c-a d)^2 g^4 (a+b x)}-\frac {2 B d^3 \log (a+b x)}{3 b (b c-a d)^3 g^4}-\frac {A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{3 b g^4 (a+b x)^3}+\frac {2 B d^3 \log (c+d x)}{3 b (b c-a d)^3 g^4}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.17, size = 140, normalized size = 0.79 \[ -\frac {3 \left (B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )+A\right )+\frac {B \left (-6 d^3 (a+b x)^3 \log (c+d x)+6 d^2 (a+b x)^2 (b c-a d)-3 d (a+b x) (b c-a d)^2+2 (b c-a d)^3+6 d^3 (a+b x)^3 \log (a+b x)\right )}{(b c-a d)^3}}{9 b g^4 (a+b x)^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.59, size = 430, normalized size = 2.43 \[ -\frac {{\left (3 \, A + 2 \, B\right )} b^{3} c^{3} - 9 \, {\left (A + B\right )} a b^{2} c^{2} d + 9 \, {\left (A + 2 \, B\right )} a^{2} b c d^{2} - {\left (3 \, A + 11 \, B\right )} a^{3} d^{3} + 6 \, {\left (B b^{3} c d^{2} - B a b^{2} d^{3}\right )} x^{2} - 3 \, {\left (B b^{3} c^{2} d - 6 \, B a b^{2} c d^{2} + 5 \, B a^{2} b d^{3}\right )} x + 3 \, {\left (B b^{3} d^{3} x^{3} + 3 \, B a b^{2} d^{3} x^{2} + 3 \, B a^{2} b d^{3} x + B b^{3} c^{3} - 3 \, B a b^{2} c^{2} d + 3 \, B a^{2} b c d^{2}\right )} \log \left (\frac {b^{2} e x^{2} + 2 \, a b e x + a^{2} e}{d^{2} x^{2} + 2 \, c d x + c^{2}}\right )}{9 \, {\left ({\left (b^{7} c^{3} - 3 \, a b^{6} c^{2} d + 3 \, a^{2} b^{5} c d^{2} - a^{3} b^{4} d^{3}\right )} g^{4} x^{3} + 3 \, {\left (a b^{6} c^{3} - 3 \, a^{2} b^{5} c^{2} d + 3 \, a^{3} b^{4} c d^{2} - a^{4} b^{3} d^{3}\right )} g^{4} x^{2} + 3 \, {\left (a^{2} b^{5} c^{3} - 3 \, a^{3} b^{4} c^{2} d + 3 \, a^{4} b^{3} c d^{2} - a^{5} b^{2} d^{3}\right )} g^{4} x + {\left (a^{3} b^{4} c^{3} - 3 \, a^{4} b^{3} c^{2} d + 3 \, a^{5} b^{2} c d^{2} - a^{6} b d^{3}\right )} g^{4}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.33, size = 473, normalized size = 2.67 \[ -\frac {2 \, B d^{3} \log \left (b x + a\right )}{3 \, {\left (b^{4} c^{3} g^{4} - 3 \, a b^{3} c^{2} d g^{4} + 3 \, a^{2} b^{2} c d^{2} g^{4} - a^{3} b d^{3} g^{4}\right )}} + \frac {2 \, B d^{3} \log \left (d x + c\right )}{3 \, {\left (b^{4} c^{3} g^{4} - 3 \, a b^{3} c^{2} d g^{4} + 3 \, a^{2} b^{2} c d^{2} g^{4} - a^{3} b d^{3} g^{4}\right )}} - \frac {B \log \left (\frac {b^{2} x^{2} + 2 \, a b x + a^{2}}{d^{2} x^{2} + 2 \, c d x + c^{2}}\right )}{3 \, {\left (b^{4} g^{4} x^{3} + 3 \, a b^{3} g^{4} x^{2} + 3 \, a^{2} b^{2} g^{4} x + a^{3} b g^{4}\right )}} - \frac {6 \, B b^{2} d^{2} x^{2} - 3 \, B b^{2} c d x + 15 \, B a b d^{2} x + 3 \, A b^{2} c^{2} + 5 \, B b^{2} c^{2} - 6 \, A a b c d - 13 \, B a b c d + 3 \, A a^{2} d^{2} + 14 \, B a^{2} d^{2}}{9 \, {\left (b^{6} c^{2} g^{4} x^{3} - 2 \, a b^{5} c d g^{4} x^{3} + a^{2} b^{4} d^{2} g^{4} x^{3} + 3 \, a b^{5} c^{2} g^{4} x^{2} - 6 \, a^{2} b^{4} c d g^{4} x^{2} + 3 \, a^{3} b^{3} d^{2} g^{4} x^{2} + 3 \, a^{2} b^{4} c^{2} g^{4} x - 6 \, a^{3} b^{3} c d g^{4} x + 3 \, a^{4} b^{2} d^{2} g^{4} x + a^{3} b^{3} c^{2} g^{4} - 2 \, a^{4} b^{2} c d g^{4} + a^{5} b d^{2} g^{4}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.16, size = 579, normalized size = 3.27 \[ \frac {B \,b^{2} d^{3} \ln \left (\frac {\left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{2} e}{d^{2}}\right )}{3 \left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{3} \left (a^{3} d^{3}-3 a^{2} c \,d^{2} b +3 a \,c^{2} d \,b^{2}-b^{3} c^{3}\right ) g^{4}}+\frac {A \,b^{2} d^{3}}{3 \left (a d -b c \right )^{3} \left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{3} g^{4}}+\frac {B b \,d^{3} \ln \left (\frac {\left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{2} e}{d^{2}}\right )}{\left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{3} \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) \left (d x +c \right ) g^{4}}-\frac {A b \,d^{3}}{\left (a d -b c \right )^{3} \left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{2} g^{4}}-\frac {2 B b \,d^{3}}{3 \left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{3} \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) \left (d x +c \right ) g^{4}}+\frac {B \,d^{3} \ln \left (\frac {\left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{2} e}{d^{2}}\right )}{\left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{3} \left (a d -b c \right ) \left (d x +c \right )^{2} g^{4}}+\frac {A \,d^{3}}{\left (a d -b c \right )^{3} \left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right ) g^{4}}-\frac {5 B \,d^{3}}{3 \left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{3} \left (a d -b c \right ) \left (d x +c \right )^{2} g^{4}}-\frac {11 B \,d^{3}}{9 \left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{3} \left (d x +c \right )^{3} b \,g^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 1.39, size = 480, normalized size = 2.71 \[ -\frac {1}{9} \, B {\left (\frac {6 \, b^{2} d^{2} x^{2} + 2 \, b^{2} c^{2} - 7 \, a b c d + 11 \, a^{2} d^{2} - 3 \, {\left (b^{2} c d - 5 \, a b d^{2}\right )} x}{{\left (b^{6} c^{2} - 2 \, a b^{5} c d + a^{2} b^{4} d^{2}\right )} g^{4} x^{3} + 3 \, {\left (a b^{5} c^{2} - 2 \, a^{2} b^{4} c d + a^{3} b^{3} d^{2}\right )} g^{4} x^{2} + 3 \, {\left (a^{2} b^{4} c^{2} - 2 \, a^{3} b^{3} c d + a^{4} b^{2} d^{2}\right )} g^{4} x + {\left (a^{3} b^{3} c^{2} - 2 \, a^{4} b^{2} c d + a^{5} b d^{2}\right )} g^{4}} + \frac {3 \, \log \left (\frac {b^{2} e x^{2}}{d^{2} x^{2} + 2 \, c d x + c^{2}} + \frac {2 \, a b e x}{d^{2} x^{2} + 2 \, c d x + c^{2}} + \frac {a^{2} e}{d^{2} x^{2} + 2 \, c d x + c^{2}}\right )}{b^{4} g^{4} x^{3} + 3 \, a b^{3} g^{4} x^{2} + 3 \, a^{2} b^{2} g^{4} x + a^{3} b g^{4}} + \frac {6 \, d^{3} \log \left (b x + a\right )}{{\left (b^{4} c^{3} - 3 \, a b^{3} c^{2} d + 3 \, a^{2} b^{2} c d^{2} - a^{3} b d^{3}\right )} g^{4}} - \frac {6 \, d^{3} \log \left (d x + c\right )}{{\left (b^{4} c^{3} - 3 \, a b^{3} c^{2} d + 3 \, a^{2} b^{2} c d^{2} - a^{3} b d^{3}\right )} g^{4}}\right )} - \frac {A}{3 \, {\left (b^{4} g^{4} x^{3} + 3 \, a b^{3} g^{4} x^{2} + 3 \, a^{2} b^{2} g^{4} x + a^{3} b g^{4}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 5.80, size = 341, normalized size = 1.93 \[ \frac {2\,A\,a\,c\,d}{3\,g^4\,{\left (a\,d-b\,c\right )}^2\,{\left (a+b\,x\right )}^3}-\frac {A\,b\,c^2}{3\,g^4\,{\left (a\,d-b\,c\right )}^2\,{\left (a+b\,x\right )}^3}-\frac {2\,B\,b\,c^2}{9\,g^4\,{\left (a\,d-b\,c\right )}^2\,{\left (a+b\,x\right )}^3}-\frac {A\,a^2\,d^2}{3\,b\,g^4\,{\left (a\,d-b\,c\right )}^2\,{\left (a+b\,x\right )}^3}-\frac {11\,B\,a^2\,d^2}{9\,b\,g^4\,{\left (a\,d-b\,c\right )}^2\,{\left (a+b\,x\right )}^3}-\frac {5\,B\,a\,d^2\,x}{3\,g^4\,{\left (a\,d-b\,c\right )}^2\,{\left (a+b\,x\right )}^3}-\frac {2\,B\,b\,d^2\,x^2}{3\,g^4\,{\left (a\,d-b\,c\right )}^2\,{\left (a+b\,x\right )}^3}-\frac {B\,\ln \left (\frac {e\,{\left (a+b\,x\right )}^2}{{\left (c+d\,x\right )}^2}\right )}{3\,b\,g^4\,{\left (a+b\,x\right )}^3}+\frac {7\,B\,a\,c\,d}{9\,g^4\,{\left (a\,d-b\,c\right )}^2\,{\left (a+b\,x\right )}^3}+\frac {B\,b\,c\,d\,x}{3\,g^4\,{\left (a\,d-b\,c\right )}^2\,{\left (a+b\,x\right )}^3}-\frac {B\,d^3\,\mathrm {atan}\left (\frac {a\,d\,1{}\mathrm {i}+b\,c\,1{}\mathrm {i}+b\,d\,x\,2{}\mathrm {i}}{a\,d-b\,c}\right )\,4{}\mathrm {i}}{3\,b\,g^4\,{\left (a\,d-b\,c\right )}^3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 4.24, size = 677, normalized size = 3.82 \[ - \frac {B \log {\left (\frac {e \left (a + b x\right )^{2}}{\left (c + d x\right )^{2}} \right )}}{3 a^{3} b g^{4} + 9 a^{2} b^{2} g^{4} x + 9 a b^{3} g^{4} x^{2} + 3 b^{4} g^{4} x^{3}} - \frac {2 B d^{3} \log {\left (x + \frac {- \frac {2 B a^{4} d^{7}}{\left (a d - b c\right )^{3}} + \frac {8 B a^{3} b c d^{6}}{\left (a d - b c\right )^{3}} - \frac {12 B a^{2} b^{2} c^{2} d^{5}}{\left (a d - b c\right )^{3}} + \frac {8 B a b^{3} c^{3} d^{4}}{\left (a d - b c\right )^{3}} + 2 B a d^{4} - \frac {2 B b^{4} c^{4} d^{3}}{\left (a d - b c\right )^{3}} + 2 B b c d^{3}}{4 B b d^{4}} \right )}}{3 b g^{4} \left (a d - b c\right )^{3}} + \frac {2 B d^{3} \log {\left (x + \frac {\frac {2 B a^{4} d^{7}}{\left (a d - b c\right )^{3}} - \frac {8 B a^{3} b c d^{6}}{\left (a d - b c\right )^{3}} + \frac {12 B a^{2} b^{2} c^{2} d^{5}}{\left (a d - b c\right )^{3}} - \frac {8 B a b^{3} c^{3} d^{4}}{\left (a d - b c\right )^{3}} + 2 B a d^{4} + \frac {2 B b^{4} c^{4} d^{3}}{\left (a d - b c\right )^{3}} + 2 B b c d^{3}}{4 B b d^{4}} \right )}}{3 b g^{4} \left (a d - b c\right )^{3}} + \frac {- 3 A a^{2} d^{2} + 6 A a b c d - 3 A b^{2} c^{2} - 11 B a^{2} d^{2} + 7 B a b c d - 2 B b^{2} c^{2} - 6 B b^{2} d^{2} x^{2} + x \left (- 15 B a b d^{2} + 3 B b^{2} c d\right )}{9 a^{5} b d^{2} g^{4} - 18 a^{4} b^{2} c d g^{4} + 9 a^{3} b^{3} c^{2} g^{4} + x^{3} \left (9 a^{2} b^{4} d^{2} g^{4} - 18 a b^{5} c d g^{4} + 9 b^{6} c^{2} g^{4}\right ) + x^{2} \left (27 a^{3} b^{3} d^{2} g^{4} - 54 a^{2} b^{4} c d g^{4} + 27 a b^{5} c^{2} g^{4}\right ) + x \left (27 a^{4} b^{2} d^{2} g^{4} - 54 a^{3} b^{3} c d g^{4} + 27 a^{2} b^{4} c^{2} g^{4}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________